const express = require('express');
const path = require('path');
const app = express();

const ejs = require('ejs');

//设置的路径
app.set('view engine','ejs');

//写渲染的路径
app.set('views',path.resolve(__dirname ,'./views'));

let title = '我是彭于晏';


app.get('/home',(req, res) => {
    res.render('./view',{title});
});

app.listen(3000,() => {
    console.log('服务已启动 3000端口正在监听....');
});